﻿var columns =
            [
                { display: 'Key', name: 'ID', type: 'text', hide: 1 },
                { display: 'Key', name: 'ProductInBillID', type: 'text', hide: 1 },
                { display: 'ProductID', name: 'ProductID', type: 'text', hide: 1 },
                { display: '产品类别', name: 'TypeName', mintWidth: 80, width: 120, type: 'text' },
                 { display: '产品名称', name: 'ProductName', mintWidth: 80, width: 160, type: 'text' },
                 { display: '产品编码', name: 'ProductCode', mintWidth: 80, width: 100, type: 'text' },
                { display: '产品规格', name: 'ProductStandard', mintWidth: 80, width: 200, type: 'text' },
                { display: '入库数量', name: 'InlCount', mintWidth: 60, width: 80, type: 'int', editor: { type: 'int'} },
                { display: '货架号', name: 'ShelfNumber', mintWidth: 100, width: 140, editor: { type: 'text'} },
                { display: '备注', name: 'Remarks', mintWidth: 80, width: 140, editor: { type: 'text'} }
             ];

var manager;
//init controls
$(document).ready(function () {
    initligerGrid();
});

function initligerGrid() {
    manager = null;
    manager = $("#ProductInBillItemsGrid").ligerGrid({
        columns: columns,
        //  title: '入库单明细',//不能要标题，修改的BUG，不在ligerui.min.js文件中，所以这个BUG还是存在
        showTitle: false,
        width: '100%',
        enabledSort: true,
        enabledEdit: true,
        // height: '80%',
        checkbox: false,
        rownumbers: true,
        url: "../ProductIn/GetJsonOfProductInBillDetails?billId=" + $("#hidbillId").val() + "&rand=" + Math.random()
    });
}
